﻿@model Consumer.Models.Assignment

@{
    ViewBag.Title = Model.Name;
}

<h2>@ViewBag.Title</h2>

<div>
    <h4>Assignment</h4>
    <hr />

    <dl class="dl-horizontal">
        <dt>
            @Html.LabelFor(model => model.Name)
        </dt>
        <dd>
            @Html.DisplayFor(model => model.Name)
        </dd>
        
        <dt>
            @Html.LabelFor(model => model.Description)
        </dt>
        <dd>
            @Html.Raw(Model.Description)
        </dd>
        
        <dt>
            @Html.LabelFor(model => model.Url)
        </dt>
        <dd>
            @Html.DisplayFor(model => model.Url)
        </dd>

        <dt>
            @Html.LabelFor(model => model.ConsumerKey)
        </dt>
        <dd>
            @Html.DisplayFor(model => model.ConsumerKey)
        </dd>
        
        <dt>
            @Html.LabelFor(model => model.ConsumerSecret)
        </dt>
        <dd>
            @Html.DisplayFor(model => model.ConsumerSecret)
        </dd>
        
        <dt>
            @Html.LabelFor(model => model.CustomParameters)
        </dt>
        <dd>
            <pre>@Html.DisplayFor(model => model.CustomParameters)</pre>
        </dd>
    </dl>
</div>

<p>
    @Html.ActionLink("Launch", "Launch", "Assignment", 
    new { id = Model.AssignmentId, returnUrl = @Request == null ? null : Request.Url == null ? null : Request.Url.AbsoluteUri },
        new { target = "_self" }) |
    @Html.ActionLink("Edit", "Edit", new { id=Model.AssignmentId }) |
    @Html.ActionLink("Back to Course", "Details", "Course", new { id = Model.Course.CourseId }, null)
</p>
